package com.kgajowy.result;

import com.kgajowy.utils.IPrintable;

import edu.pjwstk.jps.result.IAbstractQueryResult;
import edu.pjwstk.jps.result.IBinderResult;

public class BinderResult extends SingleResult implements IBinderResult , IPrintable{

    private String name;
    private IAbstractQueryResult result;
    
    public BinderResult(String name, IAbstractQueryResult result){
        this.name = name;
        this.result = result;
    }
    
    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public IAbstractQueryResult getValue() {
        return this.result;
    }

    @Override
    public String stringme() {
        String result = "";
        result += "binder(name=\"";
        result += getName();
        result += "\", value=\"";
        result += ((QueryResult)getValue()).stringme();
        result += "\")";
        return result;
    }

}
